import { http } from '@/utils/http'

export const wfTypeFindPage = () => {
  return http({
    url: "/wfmanager/wfType/findPage",
    method: 'get',
  })
}
export const select_flow_detail = (instanceId) => {
  return http({
    url: `/select_flow_detail?instanceId=${instanceId}`,
    method: 'get',
  })
}

export const select_user_by_ids = (ids) => {
  return http({
    url: `/select_user_by_ids?ids=${ids}`,
    method: 'post',
  })
}

export const notice_down_pdf = (applyId,typeName,userId) => {
  return http({
    url: `/wfmanage/trans/notice_down_pdf?applyId=${applyId}&typeName=${typeName}&userId=${userId}`,
    method: 'post',
  })
}

export const show_trans_pdf = (applyId,typeName) => {
  return http({
    url: `/wfmanage/trans/show_trans_pdf?applyId=${applyId}&typeName=${typeName}`,
    method: 'post',
  })
}

export const wf_flow_submit = (transApplyId,workitemId,applyDeptId) => {
  return http({
    url: `/wf_flow_submit?transApplyId=${transApplyId}&workitemId=${workitemId}&applyDeptId=${applyDeptId}`,
    method: 'post',
  })
}

export const update_register_status = (ids,registerStatus) => {
  return http({
    url: `/update_register_status?ids=${ids}&registerStatus=${registerStatus}`,
    method: 'post',
  })
}

export const wfTransApplysaveOrUpdate = (data) => {
  return http({
    url: "/wfmanager/wfTransApply/save_or_update",
    method: 'post',
	data
  })
}

export const select_register_by_ids = (ids) => {
  return http({
    url: `/select_register_by_ids?ids=${ids}`,
    method: 'post',
  })
}

export const wfTransApplyUpdate = (data) => {
  return http({
    url: "/wfmanager/wfTransApply/update",
    method: 'post',
	  data
  })
}

export const select_depts_by_deptIds = (deptIds) => {
  return http({
    url: `/wfmanage/common/select_depts_by_deptIds?deptIds=${deptIds}`,
    method: 'get',
  })
}